package Test1;
//开发教员类，其中教员分为Java技术方向教员以及.NET技术方向的教员，各自的要求如下：
//1.Java教员
//具有属性：姓名、性别、年龄、教龄、所在中心。
//具有方法：授课（授课的步骤依次是：打开Eclipse、实施理论课授课）、自我介绍。
//2.NET教员
//具有属性：姓名、性别、年龄、教龄、所在中心。
//具有方法：授课（授课的步骤依次是：打开Visual Studio 2017、实施理论课授课）、自我介绍。
public class Teacher {
    private String name;
    private String sex;
    private int age;
    private int teachAge;
    private String site;

    public Teacher() {
    }
    public Teacher(String name, String sex, int age, int teachAge, String site) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.teachAge = teachAge;
        this.site = site;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        if("男".equals(sex)||"女".equals(sex)){
            this.sex = sex;
        }else{
            System.out.println("性别错误");
            this.sex="男";
        }
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public int getTeachAge() {
        return teachAge;
    }
    public void setTeachAge(int teachAge) {
        this.teachAge = teachAge;
    }
    public String getSite() {
        return site;
    }
    public void setSite(String site) {
        this.site = site;
    }

    public void teachingInfo(){
        System.out.println("实施理论课授课");
    }
    public void introduce(){
        System.out.println("姓名:"+this.getName()+"、性别:"+this.getSex()+"、年龄:"+this.getAge()+"、教龄:"+this.getTeachAge()+"、所在中心:"+this.getSite());
    }
}

